-
Notifications
You must be signed in to change notification settings - Fork 545
Avoid false error on is_subclass_of #4472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.1.x
Are you sure you want to change the base?
Conversation
a26609c to
31a5ad8
Compare
31a5ad8 to
f2663f1
Compare
5500473 to
8576d53
Compare
|
This pull request has been marked as ready for review. |
|
This issue was more complicated than expected... I'm not against your opinion/review @staabm :) |
| namespace IsSubclassOf; | ||
|
|
||
| function (Bar $a, Bar $b, Bar $c, Bar $d) { | ||
| if (is_subclass_of($a, Bar::class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a test somewhere for use of is_subclass_of with a final-class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Closes phpstan/phpstan#13713
Solves phpstan/phpstan#6305 (comment)
Partially revert #1044 cc @herndlm
I don't think we can resolve the original request of phpstan/phpstan#6305 (comment) without introducing lot of false positive, like shown by this PR.